class Task < ActiveRecord::Base

  #-------- model

  
  belongs_to :user
  belongs_to :project
  has_many :week_time_sheets

  #-------- validations
  validates_presence_of :name,:start_date,:end_date, :message => " no puede estar vacío"
  validates_numericality_of  :percentage, :greater_than_or_equal_to => 0 ,:less_than_or_equal_to=>100 ,:message=> "Debe ser un número entre 0 y 100"

end
